﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace Controllers
{
    public class ErrorController:Controller
    {
        public ActionResult Index(string err= "页面不存在，或提交数据错误")
        {
            Response.StatusCode = 404;
            return Content(@"<!DOCTYPE HTML>
<html lang=""en-US"">
<head>
	<meta charset=""UTF-8"">
	<title>页面错误</title>
</head>
<body>
	<h1 style=""text-align:center;margin:200px auto 0;"">"+err+@"，页面将于3秒后跳转到首页，点击<a href=""/"">此处</a>跳转</h1>
	<script type=""text/javascript"">
	setTimeout(function(){
		window.location.href=""/""
	},3000);
	</script>
</body>
</html>", "text/html;charset=utf-8");
        }
    }
}
